#!/bin/bash
#rename.sh
#用途：重命名jpg png 文件  www.2cto.com  
count=1;
for img in *.jpg *.png
do
new=image-$count.${img##*.}
#mv "$img" "$new" 2>/dev/null
if [ $? -eq 0 ];then
echo "renameing $img to $new"
let count++
fi
done